{{ title = tree.name + " " + tree.version }}
{{include "../layouts/header.view.html"}}

<div id="page-content">
  <div class="container">

    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="{{routeUrl("phylogenies_index",{})}}">Phylogenies</a></li>
        <li class="breadcrumb-item active" aria-current="page">{{tree.name}} {{tree.version}}</li>
      </ol>
    </nav>

    <h1>{{tree.name}} {{tree.version}}</h1>
    {{if tree.deprecated}}
      <div class="alert alert-warning" role="alert">
        <i class="fas fa-exclamation-triangle"></i> This phylogeny is depracated. Please use it only for reproducibility.
      </div>
    {{end}}
    <p>{{tree.description}}</p>
    <p><small class="text-muted"><i class="far fa-clock"></i> Last Update: {{tree.lastUpdate}}&nbsp;&nbsp;<a href="{{tree.url}}"><i class="fab fa-github"></i> View on GitHub</a></small></p>


    <hr>

    {{include "search.form.html"}}



    {{ if tree.hasClusters() }}
    <h3>Clusters</h3>
      <p style="line-height: 250%;">
      {{for cluster in tree.getClusters() }}
          <a href="{{routeUrl("groups_show",{phylotree: tree.getIdWithVersion(), label: cluster.getLabel()})}}" class="btn btn-sm btn-outline-primary"">
            <i class="fas fa-folder" style="color: {{cluster.getColor()}}"></i> {{cluster.getLabel()}} ({{tree.getHaplogroupsByCluster(cluster).size() + cluster.getNodes().length}})
          </a>&nbsp;
      {{end}}
      </p>
    {{else}}
      <h3>Haplogroups ({{clades.size()}})</h3>
      <p>
      {{for clade in clades}}
        <a class="badge badge-primary" href="{{routeUrl("clades_show", {phylotree:tree.getIdWithVersion(), clade:clade.toString()})}}">{{clade}}</a>
      {{end}}
      </p>
    {{end}}
    <br><br>


    <p><b>Citation: </b></p>
    <p>Please cite the following papers if you use this phylogeny in your publication:</p>
    <ul>
      {{for source in tree.source}}
        <li>{{source}}</li>
      {{end}}
    </ul>

  </div>
</div>

{{include "../layouts/footer.view.html"}}
